<?php
namespace app\crm\model;

use think\facade\Db;
use app\admin\model\Common;
use app\admin\model\ShopModel;

class CustomerAccount extends Common
{
    protected $name = 'customer_account';

    
    //如果是加
    public function incAccount($id, $name, $num): array
    {
        return $this->where('id',$id)->inc($name,(float)$num)->update();
    }
    
    //如果是减
    public function decAccount($id, $name, $num): array
    {
        return $this->where('id',$id)->dec($name,(float)$num)->update();
    }
    
}